<!-- <div class="tab-pane fade active show" id="pills-general" role="tabpanel" aria-labelledby="pills-general-tab"> -->
<div class="card mb-4">
    <h6 class="card-header">General Settings</h6>
    <div class="card-body">
        <div class="mb-3 row">
            <div class="col-6">
                <label class="form-label">Site Domain</label>
                <input type="text" ng-model="$ctrl.appSettings.GlobalSettings.Domain" class="form-control"
                    placeholder="eg. http://mixcore.org" />
            </div>
            <div class="col-6">
                <label class="form-label">Response Cache (Seconds)</label>
                <input type="number" ng-model="$ctrl.appSettings.GlobalSettings.ResponseCache" class="form-control"
                    placeholder="" />
            </div>

        </div>
        <div class="mb-3 row">
            <div class="col-3">
                <div class="form-check form-switch">
                    <input type="checkbox" ng-model="$ctrl.appSettings.GlobalSettings.IsRegistration"
                        id="IsRegistration" class="form-check-input ng-pristine ng-untouched ng-valid ng-empty" />
                    <label class="custom-control-label mb-0" for="IsRegistration">Allow guest to register
                    </label>
                </div>
            </div>
            <div class="col-3">
                <div class="form-check form-switch">
                    <input type="checkbox" ng-model="$ctrl.appSettings.GlobalSettings.IsMaintenance" id="IsMaintenance"
                        class="form-check-input ng-pristine ng-untouched ng-valid ng-empty" />
                    <label class="custom-control-label mb-0" for="IsMaintenance">Maintenance
                    </label>
                </div>
            </div>
            <div class="col-3">
                <span class="form-check form-switch">
                    <input type="checkbox" ng-model="$ctrl.appSettings.GlobalSettings.IsRewrite" id="IsRewrite"
                        class="form-check-input ng-pristine ng-untouched ng-valid ng-empty" />
                    <label class="custom-control-label mb-0" for="IsRewrite">Rewrite URL
                    </label>
                </span>
            </div>

            <div class="col-3">
                <div class="form-check form-switch">
                    <input type="checkbox" ng-model="$ctrl.appSettings.GlobalSettings.IsHttps" id="IsHttps"
                        class="form-check-input ng-pristine ng-untouched ng-valid ng-empty" />
                    <label class="custom-control-label mb-0" for="IsHttps">Force use Https
                    </label>
                </div>
            </div>

            <div class="w-1 mt-3">
                <a href="" ng-click="$ctrl.stopApplication()" class="btn btn-primary">
                    Stop Application
                </a>
            </div>
        </div>
    </div>
</div>
<!-- </div> -->
<div class="card mb-4">
    <h6 class="card-header">Mix Settings</h6>
    <div class="card-body">
        <app-settings-heart app-settings="$ctrl.appSettings"></app-settings-heart>
    </div>
</div>

<div class="card">
    <h6 class="card-header">Secure Back-office</h6>
    <div class="card-body">
        <div class="mb-3">
            <div class="form-check form-switch">
                <input type="checkbox" ng-model="$ctrl.appSettings.IpSecuritySettings.IsRetrictIp" id="IsRetrictIp"
                    class="form-check-input ng-pristine ng-untouched ng-valid ng-empty" />
                <label class="custom-control-label mb-0" for="IsRetrictIp">Retrict IP feature
                </label>
            </div>
        </div>
        <div class="mb-3" ng-if="$ctrl.appSettings.IpSecuritySettings.IsRetrictIp">
            <label class="form-label">Allowed Portal IP</label>
            <tags-input ng-model="$ctrl.appSettings.IpSecuritySettings.AllowedPortalIps">
            </tags-input>
        </div>
        <div class="mb-3" ng-if="$ctrl.appSettings.IpSecuritySettings.IsRetrictIp">
            <div class="mb-3" ng-if="$ctrl.appSettings.IpSecuritySettings.IsRetrictIp">
                <label class="form-label">Allowed IPs</label>
                <tags-input ng-model="$ctrl.appSettings.IpSecuritySettings.AllowedIps">
                </tags-input>
            </div>
            <div class="mb-3" ng-if="$ctrl.appSettings.IpSecuritySettings.IsRetrictIp">
                <label class="form-label">Except IPs</label>
                <tags-input ng-model="$ctrl.appSettings.IpSecuritySettings.ExceptIps">
                </tags-input>
            </div>
            <div class="mb-3" ng-if="$ctrl.appSettings.GlobalSettings.AllowedHosts">
                <label class="form-label">Allowed Hosts</label>
                <tags-input min-length="1" ng-model="$ctrl.appSettings.GlobalSettings.AllowedHosts">
                </tags-input>
            </div>
            <div class="mb-3">
                <label class="form-label">Connection Strings for CMS</label>
                <textarea readonly rows="5" class="form-control"
                    ng-model="$ctrl.appSettings.ConnectionStrings.MixCmsConnection"></textarea>
            </div>
            <div class="mb-3">
                <label class="form-label">Connection Strings for Account</label>
                <textarea readonly rows="5" class="form-control"
                    ng-model="$ctrl.appSettings.ConnectionStrings.MixAccountConnection"></textarea>
            </div>
        </div>
    </div>
</div>